Dynomotion

Group: DynoMotion Message: 222 From: babinda01 Date: 3/17/2010
Subject: Lost Steps - Where the heck did they go????
Hi Tom
I have just discovered that I am losing steps with my machine, I have spent all day running product to make sure the machine is functioning correctly before I send it out, and by about the fifth part I am out of position.
Just to refresh your memory I am getting the step and direction signals out of the KFlop board from the RJ45 socket JP5, and all other io is from the KAnalog board. Initially I couldn't get the system to work at all until you suggested putting 1K pull-up resistors on the step and direction lines to my AC servo drives.
Because of the way the machine engraves it does a heap of little short stop start moves which are quite fast (approx 7000mm/min). I have slowed the system down but I still seem to be losing steps.
I havn't really noticed this before because I have just been setting the machine up and have only machined ones and two off parts.
I only seem to be losing steps, I am not gaining any, so I don't think noise is the problem.
Do you have any suggestions of what I can try next?? Is there any way of getting the step and direction pulses from another socket/connector which may work better for my needs????

Regards
Andrew
Group: DynoMotion Message: 223 From: babinda01 Date: 3/18/2010
Subject: Re: Lost Steps - Where the heck did they go????
Hi Tom

Just a thought - my servo drives can run from a single step and direction pulse or from a differential step and direction pulse. So if I were to make up a little board with a rj45 jack at one end (which connects to the kflop board) which runs my step and direction pulses through a 74hc14 to give me a differential signal, or better still a DS3486 or something similar. This should boost my signals and I can get rid of the pull up resistors. And will give me a differential signal which hopefully will stop my lost pulses.
What do you think???? Is there a simpler/better circuit???

PS I am a mechanical guy, not an electronically controlled one, so please bare with me.

Regards
Andrew
Group: DynoMotion Message: 225 From: Tom Kerekes Date: 3/18/2010
Subject: Re: Lost Steps - Where the heck did they go????
Hi Andrew,
 
I thought we were sinking current from optos to drive your amplifier's step and direction?  Will your amplifiers also accept differential?
 
If so that might not be a bad idea, but I don't see why the optos wouldn't work.  If you want to make an interface to differential outputs I wouldn't use those chips.  The 74hc14 probably would function but the spec lists a minimum input high signal of 3.15V which would be very marginal for a 3.3V output.  I think the DS3486 is a differential line receiver not a driver.  Something like a DS26LS31C should work:
 
 
You didn't answer any of my questions so I'm somewhat in the dark :}
 
Regarding the pullups, I could make a version of firmware the would probably eliminate the need for them.  A few versions back I enabled weak pull down resistors on those pins because I was receiving so many questions from users on why unconnected inputs sometimes reported high and sometimes low.  Many Users don't realize that a high impedance unconnected input can float high or low pretty much at random.  So I enabled the weak pulldown option on the outputs so they would always read low if unconnected to avoid confusion.  But I didn't realize that might cause a problem for "open collector" output mode.  The output now doesn't go completely open, but rather still has the weak pulldown (spec lists between 4K ~ 37Kohms) sinking some small current (~0.5ma).  In your case the small sinking current appears to be keeping your opto from turning off hence the need for the 1K ohm pull ups.  So it might be interesting to try, but actually with the pulldown and pull up I would expect the system to be less sensitive to noise than without it.
Thanks
TK
Group: DynoMotion Message: 228 From: babinda01 Date: 3/18/2010
Subject: Re: Lost Steps - Where the heck did they go????
Hi Tom

Yes, my drives accept either sigle ended or differential inputs and these inputs can be either sinking or sourcing. I have rummaged around in my junk and have found some 26LS31's left over from a past project, so I might give them a go.

Yes I have wired the drives up so that they are sinking current, but the optos are on my drive not on some sort of intermediate board.

Which questions havn't I answered? the last few months have been a blur, so I am not sure what I have forgotten to do.

Regards
Andrew
Group: DynoMotion Message: 229 From: Tom Kerekes Date: 3/18/2010
Subject: Re: Lost Steps - Where the heck did they go????
Hi Andrew,
 
It's worth a shot.
 
My questions:
 
How are you determining the loss of steps and why do you say they are "lost" and not gained?  I'm guessing you are seeing a change in the actual physical position (when commanded to the same coordinate) in the negative direction?
 
Are your encoders connected back to KFlop?  Or do they just go to the AC servo drives?  Is there any way to read the commanded position from the servo drives?

Possible things to try:
#1B reduce the pullup resistors to as low as 330 ohms
#2B increase the KFLOP step pulse time from the default of 32 (2us) by executing  FPGA[STEP_PULSE_LENGTH_ADD] = 63;
#3B invert the step pulse polarity by executing FPGA[STEP_PULSE_LENGTH_ADD] = 32 + 0x80;
 
Do you have specs for your drive?  Reversing the step pulse polarity may allow for more direction setup time before the step edge comes.  Do you think you might be loosing 1 step every time you reverse direction?
 
Please repeat the test we did a while back now with the pull up resistors attached to see what voltage swings we are actually getting 
 
#1C Cycle power on KFlop so everything is in the default mode (inputs=floating) and nothing is configured
#2C Measure the voltage (relative to ground) on the pin
#3C On the Digital I/O screen select the I/O bit as an Output and set the State unchecked (low).
#4C Measure the voltage (relative to ground) on the pin
 
Thanks
TK

Group: DynoMotion Message: 230 From: babinda01 Date: 3/18/2010
Subject: Re: Lost Steps - Where the heck did they go????
Hi Tom
I can physically see that the machine is not going to the correct position, and it is always short of the target position ie it always cuts shallower than was commanded it never cuts deeper - so this is why I say I am losing pulses, because it always goes shallower.

No, I don't have the encoders going back to the KFlop. They simply just go to the drives.

The reading of the commanded position is a little tricky, I can't get the commanded position out of the drive, but they have a built in oscilliscope so I possible could look at that.

The specs for the drive are:

5 - 24V Single or double ended inputs
sinking or sourcing inputs.
Max freq 2Mhz - I am running a max of 400Khz
500nSec Min Pulse width
700 ohm Input impedance

I might try the differential inputs first and see how that goes, and if that still dousn't work I will try changing the resistors.

I will repeat the test now with the 1K resistors and let you know whaqt I am getting.

You are possibly correct that the problem is on the change of direction.

Regards
Andrew

> >
Group: DynoMotion Message: 231 From: Tom Kerekes Date: 3/18/2010
Subject: Re: Lost Steps - Where the heck did they go????
Hi Andrew,
 
Thanks.  One thing I still don't get is the losing counts because it goes shallower.  Wouldn't gaining counts on the way up cause the same result?
 
Anyway how long does it take to observe the problem?  Is it a gradual change that you notice it going gradually shallower and shallower after many down and up cycles?
 
Too bad the drive specs don't say anything about which edge it steps on, or what the direction setup needs to be, or the "off" voltage.
 
If it is a direction setup issue a quick test would be to do the invert the step pulse:
 
#3B invert the step pulse polarity by executing FPGA[STEP_PULSE_LENGTH_ADD] = 16 + 0x80;

BTW if you add the differential line drivers don't forget to add 8 to the step/direction output channel settings to configure them to drive TTL rather than open collector.
 
good luck!
TK
 
 

Group: DynoMotion Message: 232 From: babinda01 Date: 3/18/2010
Subject: Re: Lost Steps - Where the heck did they go????
Hi Tom

The funny thing is that it is not a slow change, it seems to all of a sudden lose 0.8mm, you can run 3 or 4 jobs perfectly and then boom you are out of position.

The way that the machine is configured (job comes up to the cutter, not the cutter going down to the job) if the servos were reading extra pulses I am thinking the cut would be deeper, maybe I am wrong...

So am I correct in saying that my output chanels get changed from 4,5 and 6 to 12,13 and 14???

Andrew


--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Andrew,
>
> Thanks.  One thing I still don't get is the losing counts because it goes shallower.  Wouldn't gaining counts on the way up cause the same result?
>
> Anyway how long does it take to observe the problem?  Is it a gradual change that you notice it going gradually shallower and shallower after many down and up cycles?
>
> Too bad the drive specs don't say anything about which edge it steps on, or what the direction setup needs to be, or the "off" voltage.
>
> If it is a direction setup issue a quick test would be to do the invert the step pulse:
>
> #3B invert the step pulse polarity by executing FPGA[STEP_PULSE_LENGTH_ADD] = 16 + 0x80;
> BTW if you add the differential line drivers don't forget to add 8 to the step/direction output channel settings to configure them to drive TTL rather than open collector.
>
> good luck!
> TK
>
>
>
>
>
> ________________________________
> From: babinda01 <a_k@...>
> To: DynoMotion@yahoogroups.com
> Sent: Thu, March 18, 2010 4:41:39 PM
> Subject: [DynoMotion] Re: Lost Steps - Where the heck did they go????
>
>  
> Hi Tom
> I can physically see that the machine is not going to the correct position, and it is always short of the target position ie it always cuts shallower than was commanded it never cuts deeper - so this is why I say I am losing pulses, because it always goes shallower.
>
> No, I don't have the encoders going back to the KFlop. They simply just go to the drives.
>
> The reading of the commanded position is a little tricky, I can't get the commanded position out of the drive, but they have a built in oscilliscope so I possible could look at that.
>
> The specs for the drive are:
>
> 5 - 24V Single or double ended inputs
> sinking or sourcing inputs.
> Max freq 2Mhz - I am running a max of 400Khz
> 500nSec Min Pulse width
> 700 ohm Input impedance
>
> I might try the differential inputs first and see how that goes, and if that still dousn't work I will try changing the resistors.
>
> I will repeat the test now with the 1K resistors and let you know whaqt I am getting.
>
> You are possibly correct that the problem is on the change of direction.
>
> Regards
> Andrew
>
> > >
>
Group: DynoMotion Message: 233 From: Tom Kerekes Date: 3/18/2010
Subject: Re: Lost Steps - Where the heck did they go????
That is odd.  Approximately how many counts is 0.8mm?
 
12,13,14 Correct
TK

Group: DynoMotion Message: 234 From: babinda01 Date: 3/18/2010
Subject: Re: Lost Steps - Where the heck did they go????
Hi Tom
I have just got my differential board finished and hooked up, to change to TTL outputs do I do this?
ch4->InputChan0=4;
ch4->InputChan1=0;
ch4->OutputChan0=12;
ch4->OutputChan1=0;

or do I change all my ch4's to ch12??? And if so what do I set the outputchan0 = ??? to???

Regards
Andrew
Group: DynoMotion Message: 235 From: Tom Kerekes Date: 3/18/2010
Subject: Re: Lost Steps - Where the heck did they go????
That is correct.  Only change OutputChan0 to 12
TK

Group: DynoMotion Message: 248 From: babinda01 Date: 3/21/2010
Subject: Re: Lost Steps - Where the heck did they go????
Hi Tom

I am trying to run the command the following command from the console, but it just comes back as an invalid command - what am I doing wrong???
FPGA[STEP_PULSE_LENGTH_ADD] = 63;

Regards
Andrew
Group: DynoMotion Message: 249 From: Tom Kerekes Date: 3/21/2010
Subject: Re: Lost Steps - Where the heck did they go????
That can only be changed from a C program.  Add the line to your Init.c program.
 
TK